﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Pariveda.ObjectDataSource.Business
{
    public class SupplierController
    {
        public List<KeyValuePair<int, string>> GetList()
        {
            using (NorthwindDataContext db = new NorthwindDataContext())
            {
                var supplierQuery = from s in db.Suppliers
                                    orderby s.CompanyName
                                    select new KeyValuePair<int, string>(s.SupplierID, s.CompanyName);
                return supplierQuery.ToList();
            }
        }
    }
}
